function [tg_id] = tidegauge_name2id(gaugeName)
% [tg_id] = tidegauge_name2id(gaugeName)
%
% Given the station name of a tide gauge location, outputs the official
% station ID of that site.  Currently set up for the US west coast
% (excluding Alaska) and sites within the Salish Sea.
%
%
% INPUT:
%     gaugeName - a string containing the name of a US or Canada tide gauge
%                 site, such as 'Patricia Bay' for the Patricia Bay, BC
%                 site, or 'Seattle', or 'Neah Bay', etc.  Station names do
%                 include spaces
%
% OUTPUT:
%     tg_id     - a string containing site ID.  E.g., '7277' for the 
%                 Patricia Bay, BC, site, or '9443090' for Neah Bay, WA
%
%
% R. McCabe 05/2014


switch gaugeName
    case 'Campbell River'
        tg_id = '8074';
    case 'Point Atkinson'
        tg_id = '7795';
    case 'Vancouver'
        tg_id = '7735';
    case 'New Westminster'
        tg_id = '7654';
    case 'Patricia Bay'
        tg_id = '7277';
    case 'Victoria'
        tg_id = '7120';
    case 'Tofino'
        tg_id = '8615';
    case 'Bamfield'
        tg_id = '8545';
    case 'Cherry Point'
        tg_id = '9449424';
    case 'Friday Harbor'
        tg_id = '9449880';
    case 'Tacoma'
        tg_id = '9446484';
    case 'Seattle'
        tg_id = '9447130';
    case 'Port Townsend'
        tg_id = '9444900';
    case 'Port Angeles'
        tg_id = '9444090';
    case 'Neah Bay'
        tg_id = '9443090';
    case 'La Push'
        tg_id = '9442396';
    case 'Westport'
        tg_id = '9441102';
    case 'Toke Point'
        tg_id = '9440910';
    case 'Astoria'
        tg_id = '9439040';
    case 'Garibaldi'
        tg_id = '9437540';
    case 'South Beach'
        tg_id = '9435380';
    case 'Charleston'
        tg_id = '9432780';
    case 'Port Orford'
        tg_id = '9431647';
    case 'Crescent City'
        tg_id = '9419750';
    case 'Humboldt Bay' % offically "North Spit, CA"... whatever...
        tg_id = '9418767';
    case 'North Spit'
        tg_id = '9418767';
    case 'Arena Cove'
        tg_id = '9416841';
    case 'Point Reyes'
        tg_id = '9415020';
    case 'San Francisco'
        tg_id = '9414290';
    case 'Monterey Bay'
        tg_id = '9413450';
    case 'Port San Luis'
        tg_id = '9412110';
    case 'Santa Barbara'
        tg_id = '9411340';
    case 'Santa Monica'
        tg_id = '9410840';
    case 'Los Angeles'
        tg_id = '9410660';
    case 'La Jolla'
        tg_id = '9410230';
    case 'San Diego'
        tg_id = '9410170';
    otherwise
        disp(' ');
        disp('tidegauge_name2id.m:  station not found...')
        tg_id = [];
end

